
import os
from typing import List

class Input:

    def __init__(self, instruction: List[str]):
        if instruction[1] == "-help":
            print(
                "-help：查看相关命令\n"
                "-version：查看当前版本\n"
                "-run：执行用例,-run filename\n"
                "-generate：生成测试用例\n"
                  )

        elif instruction[1] == "-version":
            print("V1.0")

        elif instruction[1] == "-run":
            # cmd = "pytest -s -v " + os.path.dirname(os.path.realpath(instruction[0])) + instruction[
            #     2] + " --alluredir=./testReportData/unit"
            cmd = "python main.py"
            os.system(cmd)

        elif instruction[1] == "-generate":
            pass
        else:
            print("not found")

    def matching(self, instruction: List[str]):
        pass

